//
//  PublicTableViewCell.m
//  RoadMaintain
//
//  Created by 岳学坤 on 2017/5/23.
//  Copyright © 2017年 岳学坤. All rights reserved.
//

#import "PublicTableViewCell.h"

@implementation PublicTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        self.titleLab = [[UILabel alloc]init];
        self.titleLab.textColor = Black_Color;
        self.titleLab.text = @"震惊，楼下外卖不让进竟是因为这个";
        [self.contentView addSubview:self.titleLab];
        if (IsPad) {
            self.titleLab.font = [UIFont systemFontOfSize:14*PadZitiRate];
            [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
                make.left.mas_offset(15*PadWidthRate);
                make.top.mas_offset(18*PadHeightRate);
                make.right.mas_offset(-105*PadWidthRate);
                make.height.mas_offset(15*PadHeightRate);
            }];
        }else{
            self.titleLab.font = [UIFont systemFontOfSize:14*ZitiRate];
            [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
                make.left.mas_offset(15*WidthRate);
                make.top.mas_offset(18*HeightRate);
                make.right.mas_offset(-105*WidthRate);
                make.height.mas_offset(15*HeightRate);
            }];
        }
        
        self.timeLabel = [[UILabel alloc]init];
        self.timeLabel.textColor = Gray_Color;
        self.timeLabel.textAlignment = 2;
        self.timeLabel.text = @"2017-05-25";
        [self.contentView addSubview:self.timeLabel];
        if (IsPad) {
            self.timeLabel.font = [UIFont systemFontOfSize:13*PadZitiRate];
            [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
                make.height.mas_offset(15*PadHeightRate);
                make.top.mas_offset(18*PadHeightRate);
                make.right.mas_offset(-15*PadWidthRate);
                make.width.mas_offset(90*PadWidthRate);
            }];
        }else{
            self.timeLabel.font = [UIFont systemFontOfSize:13*ZitiRate];
            [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
                make.height.mas_offset(15*HeightRate);
                make.top.mas_offset(18*HeightRate);
                make.right.mas_offset(-15*WidthRate);
                make.width.mas_offset(90*WidthRate);
            }];
        }
            self.contentLab = [[UILabel alloc]init];
            self.contentLab.textColor = Gray_Color;
            self.contentLab.text = @"是因为门卫不让他们进，为了保护我们的安全。";
            [self.contentView addSubview:self.contentLab];
            if (IsPad) {
                self.contentLab.font = [UIFont systemFontOfSize:13*PadZitiRate];
                [self.contentLab mas_makeConstraints:^(MASConstraintMaker *make) {
                    make.left.mas_offset(15*PadWidthRate);
                    make.top.mas_offset(44*PadHeightRate);
                    make.right.mas_offset(-15*PadWidthRate);
                    make.height.mas_offset(15*PadHeightRate);
                }];
            }else{
                self.contentLab.font = [UIFont systemFontOfSize:13*ZitiRate];
                [self.contentLab mas_makeConstraints:^(MASConstraintMaker *make) {
                    make.left.mas_offset(15*WidthRate);
                    make.top.mas_offset(44*HeightRate);
                    make.right.mas_offset(-15*WidthRate);
                    make.height.mas_offset(15*HeightRate);
                }];
            }
        
        self.blueLine = [[UIView alloc]init];
        self.blueLine.backgroundColor = MAIN_Color;
        self.blueLine.hidden = YES;
        [self.contentView addSubview:self.blueLine];
        [self.blueLine mas_updateConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(0);
            make.left.mas_equalTo(0*PadWidthRate);
            make.width.mas_equalTo(3*PadWidthRate);
            make.bottom.mas_equalTo(0);
        }];
        
        self.line = [[UIView alloc]init];
        self.line.backgroundColor = Line_Color;
        [self.contentView addSubview:self.line];
        [self.line mas_updateConstraints:^(MASConstraintMaker *make) {
            make.bottom.mas_equalTo(0);
            make.left.mas_equalTo(0);
            make.right.mas_equalTo(0);
            make.height.mas_equalTo(1);
        }];
        
    }
    return self;
}

@end
